<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>水仙花数</title>
		<script type="text/javascript">
			var num = 0;
			for (num = 100; num <= 999; num++) {
                 var a=num%10;
				 var b=(parseInt(num/10))%10;
				 var c=parseInt(num/100);
				 var d=a*a*a+b*b*b+c*c*c;
				 if(d==num){
					 document.write("水仙花数有"+num+"<br />")
				 }
			}
		</script>
	</head>
	<body>
	</body>
</html>
